Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default value handling for configuration options #90

Merged
merged 1 commit into from
Nov 10, 2021

Conversation

frenck
Copy link
Member

@frenck frenck commented Nov 10, 2021

Proposed Changes

0.14.0, introduced the possibility to pass a default value to the config options, in order to get a different default value returned if an option wasn't set by the user.

However, the default of the default value, was an empty string. This caused not set configuration options to become set...

This PR fixes that behavior by making the default value null, which is the same as not set.
It also saves a couple of calls this way :)

Tested with the Z-Wave JS @ MQTT add-on, which relies on this.

@frenck frenck added the bugfix Inconsistencies or issues which will cause a problem for users or implementors. label Nov 10, 2021
@frenck frenck merged commit 4d2fa76 into main Nov 10, 2021
@frenck frenck deleted the frenck-2021-2859 branch November 10, 2021 09:50
@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bugfix Inconsistencies or issues which will cause a problem for users or implementors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants